package com.nidu.demo.user.convertor;

import com.nidu.demo.base.BaseConvertor;
import com.nidu.demo.convertor.MapStructConfig;
import com.nidu.demo.user.dto.UserRoleCO;
import com.nidu.demo.user.model.UserRole;
import com.nidu.demo.user.mapper.dataobject.UserRoleDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(config = MapStructConfig.class)
public interface UserRoleConvertor extends BaseConvertor<UserRoleDO, UserRole, UserRoleCO> {

    @Override
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "createBy", ignore = true)
    @Mapping(target = "updateBy", ignore = true)
    UserRoleDO toDataObject(UserRole userRole);
}